﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChartSharp
{
    public class BarSize : ChartParam
    {
        protected int _barWidth;
        protected int? _barSpace;

        public override string Name
        {
            get { return "chbh"; }
        }

        public override string Data
        {
            get
            {
                string s = string.Empty;
                s += _barWidth;

                if (_barSpace.HasValue)
                {
                    s += ",";
                    s += _barSpace.Value;
                }

                return s;
            }
        }

        public BarSize(int width)
        {
            _barWidth = width;
        }

        public BarSize(int width, int space)
        {
            _barWidth = width;
            _barSpace = space;
        }
    }
}
